package com.arpa.wms.domain.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.Digits;
import java.math.BigDecimal;

/**
 * <p>
 * 预打包单
 * </p>
 *
 * @author leo
 * @since 2021-07-02
 */
@Data
@EqualsAndHashCode(callSuper = true)
@TableName("wms_prepackaged_item")
@ApiModel(value="PrepackagedItem对象", description="预打包单")
public class PrepackagedItem extends BasicEntity {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "预打包明细标识")
    @TableField("code")
    private String code;

    @ApiModelProperty(value = "预打包计划号")
    @TableField("prepackaged_code")
    private String prepackagedCode;

    @ApiModelProperty(value = "商品编码code")
    @TableField("goods_code")
    private String goodsCode;

    @ApiModelProperty(value = "商品编码")
    @TableField("good_code")
    private String goodCode;

    @ApiModelProperty(value = "商品名称")
    @TableField("goods_name")
    private String goodsName;

    @ApiModelProperty(value = "组织机构")
    @TableField("group_code")
    private String groupCode;

    @ApiModelProperty(value = "商品条码")
    @TableField("goods_bar_code")
    private String goodsBarCode;

    @ApiModelProperty(value = "单包裹组合数量")
    @TableField("combination_quantity")
    @Digits(integer = 20,fraction = 6,groups = {Prepackaged.Save.class, Prepackaged.Update.class})
    private BigDecimal combinationQuantity;

    @ApiModelProperty(value = "单位")
    @TableField("goods_unit")
    private String goodsUnit;

    @ApiModelProperty(value = "单位名称")
    @TableField("goods_unit_name")
    private String goodsUnitName;

    @ApiModelProperty(value = "总数量 = 包裹 * 单包裹组合数量")
    @TableField("total_quantity")
    @Digits(integer = 20,fraction = 6,groups = {Prepackaged.Save.class, Prepackaged.Update.class})
    private BigDecimal totalQuantity;

    @ApiModelProperty(value = "可用库存")
    @TableField("available_stock_quantity")
    @Digits(integer = 20,fraction = 6,groups = {Prepackaged.Save.class, Prepackaged.Update.class})
    private BigDecimal availableStockQuantity;

    @ApiModelProperty(value = "库存缺货数量")
    @TableField("stock_out_quantity")
    @Digits(integer = 20,fraction = 6,groups = {Prepackaged.Save.class, Prepackaged.Update.class})
    private BigDecimal stockOutQuantity;

    @ApiModelProperty(value = "分配数量")
    @TableField("distribution_quantity")
    private BigDecimal distributionQuantity;

    @ApiModelProperty(value = "状态,0-新增。1-待分配，2-部分分配，3-已分配")
    @TableField("status")
    private String status;

    @ApiModelProperty(value = "备注")
    @TableField("remarks")
    private String remarks;

    @ApiModelProperty(value = "拣货数量")
    @TableField("picking_quantity")
    private BigDecimal pickingQuantity;

    @ApiModelProperty(value = "商品规格")
    @TableField("spec")
    private String spec;

    @ApiModelProperty(value = "待分配数量")
    @TableField("not_distribution_quantity")
    private BigDecimal notDistributionQuantity;





}
